<?php
/**
 * 
 *    Dialog for add and edit user data
 * 
 */
?>


<div id="dialog-user-add-edit" class="hide" title="<?php echo lang('term_user'); ?>" >
  <h1><?php echo lang('term_user'); ?></h1>
  <form id="form-user-add-edit" action="" method="post">
    
    
    <label>ID:</label><input type="text" readonly="readonly" name="user[id]" id="user_id" value='' class="text ui-widget-content ui-corner-all" /> 
    <label>IP:</label><input type="text" readonly="readonly" name="user[ip_address]" id="user_ip_address" value='' class="text ui-widget-content ui-corner-all"/> 
    
    <label><?=lang('state')?>:</label>
        <select name="user[state]" id="user_state" class="text ui-widget-content ui-corner-all" >
          <option value=''></option>
          <?php 
          if( count($states)>0 )
            foreach ($states as $row)
            {
              echo "<option value={$row->name}>".lang($row->name)."</option>";
            }
          ?>          
        </select>
    
    <label>* <?=lang('username')?>:</label>
      <input type='text' name='user[username]' id="user_username" class="text ui-widget-content ui-corner-all" />
    
    <label><?=lang('status')?>:</label>
        <select name="user[status]" id="user_status" disabled="disabled" class="text ui-widget-content ui-corner-all" >
          <option value='0'><?=lang('status_0')?></option>
          <option value='1'><?=lang('status_1')?></option>
          <option value='-1'><?=lang('status_-1')?></option>
        </select>
    
    <label><?=lang('zip_code')?>:</label>
      <input type='text' name='user[zip_code]' id="user_zip_code" class="text ui-widget-content ui-corner-all" />
    
    <label style='clear: left !important;'><?=lang('password')?>:</label>
      <input type='password' name='user[password]' id="user_password" class="text ui-widget-content ui-corner-all" />
    <label><?=lang('gender')?>:</label>
        <select name="user[gender]" id="user_gender" class="text ui-widget-content ui-corner-all" >
          <option value='male'><?=lang('male')?></option>
          <option value='female'><?=lang('female')?></option>
        </select>
    
    <label><?=lang('affiliate')?>:</label>
      <input type='text' name='user[affiliate]' id="user_affiliate" class="text ui-widget-content ui-corner-all" />    
    <label style='clear: left !important;'>* E-mail:</label>
      <input type='text' name='user[email]' id="user_email" class="text ui-widget-content ui-corner-all" />
       
    
    <label><?=lang('look_for')?>:</label>
        <select name="user[look_for]" id="user_look_for" class="text ui-widget-content ui-corner-all" >          
          <option value='female'><?=lang('female')?></option>
          <option value='male'><?=lang('male')?></option>
          <option value='both'><?=lang('both')?></option>
        </select>
    
    <label><?=lang('registration_date')?>:</label>
      <input type='text' name='user[registration_date]' id="user_registration_date" class="text date_picker ui-widget-content ui-corner-all" />
    
    <label style='clear: left !important;'>* <?=lang('birthdate')?>:</label>
      <input type='text' name='user[birthdate]' id="user_birthdate" class="text date_picker ui-widget-content ui-corner-all" />
      
    <label>*<?=lang('user_group')?>:</label>
        <select name="user[user_group]" id="user_user_group" class="text ui-widget-content ui-corner-all" >                 
         <option value=''></option>
          <?php 
          if( count($user_groups)>0 )
            foreach ($user_groups as $row)
            {
              echo "<option value={$row->id}>".lang($row->name)."</option>";
            }
          ?>
        </select>
    
    <label><?=lang('team')?>:</label>
        <select name="user[team_id]" id="user_team" class="text ui-widget-content ui-corner-all" >          
          <option value=''> </option>          
        </select>
    
    <label style='clear: left !important;'><?=lang('flirt_text')?>:</label>
        <textarea name="user[flirt_text]" id="user_flirt_text" class="txtarea ui-widget-content ui-corner-all" ></textarea>
       
       <div style='margin-left: 100px; margin-top: 10px;' id="user_response"></div> 
        <br/>
        <hr/>
        <input type="submit" name="user_submit" value="<?=lang('term_save')?>" class='right ui-button ui-button-text-only ui-widget ui-state-default ui-corner-all' />
        
            
    
  </form>
  
</div>


